<?php
namespace App\Http\Requests\Api;
class UpdateTopicRequest extends FormRequest {
    public function rules() {
        return [
            'title' => 'required|max:200',
            'content' => 'required',
            'category_id' => 'required|exists:categories,id'
        ];
    }
    public function attributes() {
        return [
            'title' => '帖子标题',
            'content' => '帖子内容',
            'category_id' => '帖子分类ID'
        ];
    }
}
